<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="renderer" content="webkit">
  	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  	<meta name="apple-mobile-web-app-status-bar-style" content="black"> 
  	<meta name="apple-mobile-web-app-capable" content="yes">
  	<meta name="format-detection" content="telephone=no">
	<title>文章列表页 - Blog</title>
	<link rel="stylesheet" href="./static/layui/css/layui.css">
	<link rel="stylesheet" href="./static/css/common.css">
</head>
<body>
	<header class="layui-bg-cyan">
		<nav class="layui-container">
			<div class="layui-row">
			    <div class="layui-col-md2 logo">
			    	<a href="javascript:;"><img style="height: 50px;" src="./static/images/logo.png"></a>
			    </div>
			    <div class="layui-col-md6 layui-hide-xs">
			    	<ul class="layui-nav layui-bg-cyan">
					  	<li class="layui-nav-item">
					    	<a href="./index.html">首页</a>
					  	</li>
						<li class="layui-nav-item layui-this">
						<script id="category" type="text/html">
					    	<a href="./articleList.html">文章<span class="layui-nav-more"></span></a>
								<dl class="layui-nav-child">
							{{#  if(d.data.list.length != 0){ }}
							 {{#  layui.each(d.data.list, function(index, item){ }}
						      		<dd><a href="./category.html?id={{item.id}}">{{item.content}}</a></dd> 	  
							 {{#  }); }}
								</dl>
							{{#  } }}
						</script>
							<div id = "categoryList"></div>
					  	</li>
						<li class="layui-nav-item" id="edit">
					    	<a href="./editor.html">开始创作</a>
					  	</li>
					  	<!-- <li class="layui-nav-item">
					    	<a href=" ">关于</a>
					  	</li> -->
					</ul>
			    </div>
			    <div class="layui-col-md4 layui-hide-xs userinfoBox">
			    	<ul class="layui-nav layui-bg-cyan">
			    		<li class="layui-nav-item">
					    	<a href="./search.html" id="toSearch"><i class="layui-icon layui-icon-search search"></i></a>
					  	</li>
					  	<li class="layui-nav-item" lay-unselect="">
						  	<script id="person" type="text/html">
						    <a href="javascript:;"><img src={{d.data.avatar}} class="layui-nav-img">{{d.data.name}}	
								<span class="layui-nav-more"></span></a>
						 	   <dl class="layui-nav-child">
								{{# if(d.data.id != 0) { }}
						      		<dd><a href="./person.html">我的文章</a></dd>
									{{# if(d.data.id == 1){ }}
									<dd><a href="./admin.html">系统管理</a></dd>
									{{# } }}
						      		<dd><a href="javascript:;" id="logout">退出</a></dd>
								{{# } else { }}
									<dd><a href="./login.html">登录</a></dd>
								{{# } }}
								</dl>
							</a>
							</script>
							<div id = "account"></div>
						</li>
					</ul>
			    </div>
		   	</div>
		</nav>
	</header>

	<div class="layui-container" style="min-height: 100vh;">
		<div class="layui-row layui-col-space20">
			<div class="layui-col-md8">
				<div class="layui-row">
					<script id="articleList" type="text/html">
					{{# if(d.data.list.length != 0) { }}
					{{# layui.each(d.data.list, function(index, item){ }}
					<div class="layui-col-md12">
						<div class="main list">
							<div class="subject">
								<a href="./category.html?id={{item.categoryVo.typeId}}" class="caty">{{item.categoryVo.content}}</a>
								<a href="./article.html?id={{item.id}}" title="{{item.title}}">{{item.title}}</a>
								<em>{{item.ctime}} 发布</em></div>
							<div class="content layui-row">
{{# if(item.pirture != null && item.pirture != "" && item.pirture != "null") { }}
									<div class="layui-col-md4 list-img">
										<a href="./article.html?id={{item.id}}"><img style="width:95%;height:150px;" src="{{item.pirture}}"></a>
									</div>
									<div class="layui-col-md8">
										<div class="list-text">{{item.content}}</div>
										<div class="list-stat layui-row">
										<div class="layui-col-xs3 layui-col-md3 Label">
											<i class="layui-icon layui-icon-note"></i>
											{{# layui.each(item.labelVos,function(index2,item2){ }}
											<a href="./label.html?id={{item2.typeId}}">{{item2.content}}</a>
											{{# }); }}
										</div>
										<div class="layui-col-xs3 layui-col-md3">
											<i class="layui-icon layui-icon-reply-fill"></i>
											<em>{{item.commentCount==null?0:item.commentCount}}条评论</em>
										</div>
										<div class="layui-col-xs3 layui-col-md3">
											<i class="layui-icon layui-icon-read"></i>
											<em>{{item.likeCount==null?0:item.likeCount}}次点赞</em>
										</div>
										<div class="layui-col-xs3 layui-col-md3 alink">
											<a href="./article.html?id={{item.id}}" class="layui-btn layui-btn-xs">阅读原文</a>
										</div>
									</div>
									</div>
									{{# }else { }}
									<div class="layui-col-md12">
																				<div class="list-text">{{item.content}}</div>
										<div class="list-stat layui-row">
										<div class="layui-col-xs3 layui-col-md3 Label">
											<i class="layui-icon layui-icon-note"></i>
											{{# layui.each(item.labelVos,function(index2,item2){ }}
											<a href="./label.html?id={{item2.typeId}}">{{item2.content}}</a>
											{{# }); }}
										</div>
										<div class="layui-col-xs3 layui-col-md3">
											<i class="layui-icon layui-icon-reply-fill"></i>
											<em>{{item.commentCount==null?0:item.commentCount}}条评论</em>
										</div>
										<div class="layui-col-xs3 layui-col-md3">
											<i class="layui-icon layui-icon-read"></i>
											<em>{{item.likeCount==null?0:item.likeCount}}次点赞</em>
										</div>
										<div class="layui-col-xs3 layui-col-md3 alink">
											<a href="./article.html?id={{item.id}}" class="layui-btn layui-btn-xs">阅读原文</a>
										</div>
									</div>
									{{# } }}
							</div>
						</div>
					</div>
					<div class="layui-col-md12 margin20"></div>
					{{# }); }}
					{{# }else { }}
						无更多内容！
					{{# } }}
					</script>
					<div id="articleListView"></div>
					<div class="layui-col-md12" id="pages"></div>
				</div>
	        </div>
	        <div class="layui-col-md4">
				<div class="layui-row">
					<div class="layui-col-md12">
						<div class="layui-card">
						  	<div class="layui-card-header">
								<span>
									热门文章
								</span>
						  	</div>
						  	<script id="hotArticle" type="text/html">
						  	<div class="layui-card-body">
								<table class="layui-table" lay-skin="nob">
								  	<tbody>
										{{# if(d.data.list.length != 0){ }}
										{{# layui.each(d.data.list, function(index, item){ }}
								    		<tr><td><a href="./article.html?id={{item.id}}">{{item.title}}</a></td></tr>
										{{# }); }}
										{{# } }}
								  	</tbody>
								</table>
						  	</div>
							</script>
							<div id="hotArticleView"></div>
						</div>
					</div>
				</div>
	        </div>
		</div>
	</div>

	<!-- 尾部 -->
	<div class="footer"></div>
	<footer class="layui-bg-cyan">
		<div class="layui-container">
			<div class="layui-row">
				<p>本站部分内容来源于网络，若侵犯到您的利益，请联系站长删除！谢谢！Powered By <a href="https://gitee.com/XzcGroup/XzcBlogTemplate" target="_blank" title="XzcBlogTemplate">XzcBlogTemplate</a></p>
			</div>
		</div>
	</footer>
</body>
<script src="./static/layui/layui.all.js"></script>
<script src="./static/js/articleList.js"></script>
</html>